package exam.day27;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int count = 1;
        for(int i = n - m + 1; i <= n; i++) {
            count *= i;
        }
        System.out.println(count % 109);
    }
}
